package com.study.designmodes.service.liabilityChain.v3;

import lombok.extern.slf4j.Slf4j;

/**
 * 价格校验器
 *
 * @author yangyanbin
 * @date 2023/03/23
 * @since 20230323
 */
@Slf4j
public class OrderPriceFilter implements OrderFilter<Order> {
    /**
     * 执行业务逻辑
     *
     * @param order t
     * @return boolean
     */
    @Override
    public boolean execute(Order order) {
        if (0 == order.getPrice()) {
            log.error("价格错误");
            return false;

        }
        return true;
    }
}

